package com.example.immanager.entity;

import cn.hutool.core.annotation.Alias;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author Lukecheng
 * @date 2023/04/18
 */


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("db_user")
@ApiModel(value = "User对象", description = "")
public class User extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("邮箱")
    @Alias("邮箱")
    private String email;

    @ApiModelProperty("昵称")
    @Alias("昵称")
    private String nickname;


    @ApiModelProperty("头像")
    @Alias("头像")
    private String avatar;

    @ApiModelProperty("性别")
    @Alias("性别")
    private Integer gender;

    @ApiModelProperty("密码")
    @Alias("密码")
    private String password;

    @ApiModelProperty("背景图")
    @Alias("背景图")
    private String background;

    @ApiModelProperty("生日")
    @Alias("生日")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @ApiModelProperty("介绍")
    @Alias("介绍")
    private String introduction;

    @ApiModelProperty("是否被激活")
    @Alias("是否被激活")
    private Boolean isActivated;

    @ApiModelProperty("角色")
    @Alias("角色")
    private String role;


}
